#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::vector;

class Point{
public:
    Point(int x = 0,int y = 0)
    : _ix(x)
    , _iy(y)
    {
        cout << "Point(int,int)" << endl;
    }

    /* Point(const Point & rhs) */
    /* : _ix(rhs._ix) */
    /* , _iy(rhs._iy) */
    /* { */
    /*     cout << "Point(const Point &)" << endl; */
    /* } */

    void print() const{
        cout << "(" << _ix
            << "," << _iy
            << ")" << endl;
    }
private:
    int _ix;
    int _iy;
};

void test0(){
    vector<Point> nums;

    //5个该类型的默认值
    vector<Point> nums2(5);
    for(auto & ele : nums2){
        ele.print();
    }
#if 0
    //隐式转换有关，下午讲
    cout << endl;
    vector<Point> nums3(3,4);
    for(auto & ele : nums3){
        ele.print();
    }
    
    cout << endl;
    vector<Point> nums4{3,4};
    for(auto & ele : nums4){
        ele.print();
    }
#endif

    cout << endl;
    vector<Point> nums5{{2,6},{8,9}};
    for(auto & ele : nums5){
        ele.print();
    }
}

void test2(){
    vector<Point> vec;
    vec.push_back(Point(3,5));
    vec.push_back(Point(8,9));
    vec.push_back(Point(6,7));
    vec.push_back(Point(6,7));
}

int main(void){
    test0();
    return 0;
}

